package com.entmanage.base.oa.service;

import java.util.List;
import com.entmanage.base.oa.domain.OaOvertimeApply;
import org.springframework.scheduling.annotation.Async;

/**
 * 加班申请Service接口
 * 
 * @author lsq
 * @date 2025-09-26
 */
public interface IOaOvertimeApplyService 
{
    /**
     * 查询加班申请
     * 
     * @param id 加班申请主键
     * @return 加班申请
     */
    public OaOvertimeApply selectOaOvertimeApplyById(Long id);

    /**
     * 查询加班申请列表
     * 
     * @param oaOvertimeApply 加班申请
     * @return 加班申请集合
     */
    public List<OaOvertimeApply> selectOaOvertimeApplyList(OaOvertimeApply oaOvertimeApply);

    /**
     * 新增加班申请
     * 
     * @param oaOvertimeApply 加班申请
     * @return 结果
     */
    public int insertOaOvertimeApply(OaOvertimeApply oaOvertimeApply);

    /**
     * 修改加班申请
     * 
     * @param oaOvertimeApply 加班申请
     * @return 结果
     */
    public int updateOaOvertimeApply(OaOvertimeApply oaOvertimeApply);

    /**
     * 批量删除加班申请
     * 
     * @param ids 需要删除的加班申请主键集合
     * @return 结果
     */
    public int deleteOaOvertimeApplyByIds(Long[] ids);

    /**
     * 删除加班申请信息
     * 
     * @param id 加班申请主键
     * @return 结果
     */
    public int deleteOaOvertimeApplyById(Long id);


    @Async
    void sendOvertimeApprovalEmail(
            List<Long> approverIds,
            List<Long> ccIds,
            String startTime,
            String endTime,
            String reason,
            String duration,
            String applicantName);

    List<OaOvertimeApply> selectByApproverId(Long approverId);

    List<OaOvertimeApply> selectByCcId(Long currentUserId);
}
